<%#
 Copyright 2013-2025 the original author or authors from the JHipster project.

 This file is part of the JHipster project, see https://www.jhipster.tech/
 for more information.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      https://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-%>
<%#
 This is a fragment file, it will be merged into the root template if available.
 EJS fragments will process % delimiter tags in the template and & delimiter tags during the merge process.
-%>
<&_ if (fragment.othersSection) { -&>
### About Native Build

#### Installation

To build a Native image, you need to install a JDK that is compatible with GraalVM. Please refer to the [GraalVM Release Notes](https://www.graalvm.org/release-notes/) and install the appropriate JDK. Using SDKMAN simplifies the installation process.
```
sdk install java 21-graalce
```
#### How to Build a Native Image

To build a native image, execute the following command:
```bash
npm run native-package
# <%- packageJsonScripts['native-package'] %>
```

After that, set up peripheral services like PostgreSQL using `npm run services:up`(<%- packageJsonScripts['services:up'] %>) and ensure everything is ready.

Lastly, run the Native image and experience its fast startup 😊.
```bash
npm run native-start
# <%- packageJsonScripts['native-start'] %>
```

If you've enabled e2e testing with Cypress, you can verify its operation using the following command:
```bash
npm run native-e2e
# <%- packageJsonScripts['native-e2e'] %>
```
<&_ } -&>
